﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace EntityframeworkDemo.Models
{
    public class User : EntityBase
    {
        [StringLength(256)]
        public string Name { get; set; }

        [StringLength(256)]
        public string RealName { get; set; }

        [StringLength(256)]
        public string NickName { get; set; }

        [StringLength(256)]
        public string Password { get; set; }

        [StringLength(50)]
        public string PhoneNumber { get; set; }

        public bool IsPhoneConfirmed { get; set; }

        [StringLength(50)]
        public string EmailAddress { get; set; }

        public bool IsEmailConfirmed { get; set; }

        [StringLength(256)]
        public string Avatar { get; set; }

        public DateTime CreateOn { get; set; }

        public virtual Organization Organization { get; set; }


        //public virtual bool Login(string usernameOrPhoneOrEmail, string password);

        //public virtual bool Register(
        //    string username,
        //    string phone,
        //    string email,
        //    string realName,
        //    string nickName,
        //    string password);

        //public virtual void Set(string nickName, string avater);

        //public virtual void ResetPassword(string oldPassword, string newPassword);

        //public virtual void ResetPasswordByPhone(string newPassword, string captcha);

        //public virtual void ResetPasswordByEmail(string newPassword, string captcha);

        //public virtual void ChangePhoneNumber(string newPhoneNumber, string captcha);

        //public virtual void ChangeEmail(string newEmailAddress, string captcha);
    }
}
